package com.ph.shopping.facade.mapper;

import com.ph.shopping.common.core.base.BaseMapper;
import com.ph.shopping.facade.permission.dto.UserDto;
import com.ph.shopping.facade.permission.entity.User;
import com.ph.shopping.facade.permission.vo.UserVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @项目：phshopping-service-permission
 * @描述： 用户mapper
 * @作者： Mr.zheng
 * @创建时间：2017-03-14
 * @Copyright @2017 by Mr.zheng
 */
public interface UserMapper extends BaseMapper<User> {

    /**
     * 通过用户手机号查询用户登录信息
     * @param telphone
     * @return User
     */
    User findUserByPhone(@Param("telphone") String telphone);

    /**
     * @分页获取所有用户数量
     * @return
     */
    public int getUserCount(Map<String,Object> map);

    /**
     * @分页获取所有用户
     * @return
     */
    public List<UserVo> getUserByPage(@Param("user")UserDto userDto);
}
